package com.spzx.order.api;

import com.spzx.common.core.constant.ServiceNameConstants;
import com.spzx.common.core.domain.R;
import com.spzx.common.core.web.domain.AjaxResult;
import com.spzx.order.api.domain.OrderInfo;
import com.spzx.order.api.factory.RemoteOrderFallbackFactory;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(contextId = "remoteOrderService"
        ,value = ServiceNameConstants.ORDER_SERVICE //注册中心的服务名
        , fallbackFactory = RemoteOrderFallbackFactory.class //降级工厂
)
public interface RemoteOrderService {
    @Operation(summary = "内部调用：确认支付获取订单信息")
    @GetMapping("orderInfo/getPaymentOrderInfo/{orderNo}")
    public R<OrderInfo> getOrderInfoByOrderNo(@PathVariable("orderNo") String orderNo);
}
